<template>
  <el-config-provider :locale="elLocale">
    <RouterView />
  </el-config-provider>
</template>

<script setup lang="ts">
  import { RouterView } from 'vue-router'
  import { computed } from 'vue'
  import zh from 'element-plus/es/locale/lang/zh-cn'
  import en from 'element-plus/es/locale/lang/en'
  import i18n from '@/i18n/index'
  const { locale } = i18n.global
  const elLocale = computed(() => {
    return locale.value === 'zh' ? zh : en
  })
</script>
<style></style>
